package com.songlanyun.modules.pointsexchangeconfig.controller.api;

import com.songlanyun.common.utils.R;
import com.songlanyun.common.validator.ValidatorUtils;
import com.songlanyun.modules.pointsexchangeconfig.entity.PointsExchangeConfigEntity;
import com.songlanyun.modules.pointsexchangeconfig.service.PointsExchangeConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

//import org.apache.shiro.authz.annotation.RequiresPermissions;


/**
 * 积分兑换配置
 *
 * @author wuchao
 * @email songlanyun@gmail.com
 * @date 2022-08-06 15:34:36
 */
@RestController
@RequestMapping("/api/points/exchange/config")
public class PointsExchangeConfigApiController {
    @Autowired
    private PointsExchangeConfigService pointsExchangeConfigService;

    /**
     * 信息
     */
    @GetMapping("/info")
    //@RequiresPermissions(":pointsexchangeconfig:info")
    public R info() {
        PointsExchangeConfigEntity pointsExchangeConfig = pointsExchangeConfigService.loadConfig(false);

        return R.ok().put("data", pointsExchangeConfig);
    }



}
